﻿@model IEnumerable<FloodFree.Common.City>

@{
    ViewBag.Title = @Resources.Resource.AdminMenuCities;
    Layout = "~/Areas/Admin/Views/Shared/_LayoutAdmin.cshtml";
}

<h2>@Resources.Resource.AdminMenuCities</h2>

@{
    Html.RenderPartial("_ValidationSummary", ViewData.ModelState);
}

<p>
    @Html.ActionLink(@Resources.Resource.AdminAddCity, "Create")
</p>

<table class="table table-bordered">
    <tr>
        <th>
            @Resources.Resource.Name
        </th>
        <th>
            @Resources.Resource.State
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.State.Name)
        </td>
        <td>
            @Html.ActionLink(@Resources.Resource.Edit, "Edit", new { id = item.Id }) |
            @Html.ActionLink(@Resources.Resource.Delete, "Delete", new { id = item.Id })
        </td>
    </tr>
}

</table>